<script setup>
import LeftChart from './components/LeftChart.vue'
import RightChart from './components/RightChart.vue'
import Map from '@/views/Map/index.vue'
import { ref, onMounted } from 'vue'
const mapRef = ref(null);
const viewer = ref(null);

onMounted(() => {
  viewer.value = mapRef.value.viewer; // 获取 Map 组件中的 viewer 对象
});
</script>
<template>
  <el-row class="dashboard">
    <el-col :span="6">
      <LeftChart />
    </el-col>
    <el-col :span="6">
      <RightChart :viewer="viewer" />
    </el-col>
  </el-row>
  <Map ref="mapRef"/>
</template>
<style scoped>
  .dashboard {
    width: 100%;
    height: calc(100vh - 60px);
    position: absolute;

  }
</style>
